mwan3: fix disconnected event generation in mwan3track
authorFlorian Eckert <[email protected]>
Mon, 18 Feb 2019 12:14:10 +0000 (13:14 +0100)
committerFlorian Eckert <[email protected]>
Wed, 27 Feb 2019 12:50:51 +0000 (13:50 +0100)
Before this change two disconnected events were generated. This is wrong!
The disconnected event is impliciet generated by the hotplug script on ifdown
event. The mwan3track script is notified by a USR1 signal which
generates the disconnectd event. The additional "disconnectd" event on
ifdown is not required.

Signed-off-by: Florian Eckert <[email protected]>
net/mwan3/Makefile
net/mwan3/files/usr/sbin/mwan3track

index 5ad3e7e3f6eca5903ac9f807d14781672d484184..9ff6e7e01c0e0a2b2415a8b0904fd157cb6db218 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
-PKG_VERSION:=2.7.10
+PKG_VERSION:=2.7.11
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Florian Eckert <[email protected]>
 PKG_LICENSE:=GPLv2
index 375e62a0f1073420ca90b26255f823da98ab4285..09ee3c119b951790cd5f0c370830f68f4e2982d8 100755 (executable)
@@ -221,11 +221,7 @@ main() {
 
                        if [ $score -eq $up ]; then
                                echo "offline" > /var/run/mwan3track/$1/STATUS
-                               echo "0" > /var/run/mwan3track/$1/UPTIME
-                               echo "$(get_uptime)" > /var/run/mwan3track/$1/DOWNTIME
-                               $LOG notice "Interface $1 ($2) is offline"
                                env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface
-                               env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
                                score=0
                        fi
                else